public class Main {
    public static void main(String[] args) {

/*变化点:可以很方便的更换SubjectReal,直接创建一个SubjectReal01、02非常方便，当然也可以从XML中反射
        来决定new SubjectReal哪一种*/

        SubjectReal01 realSubject01= new SubjectReal01();
        SubjectReal02 realSubject02= new SubjectReal02();

        AbstractSubject subject01= new SubjectProxy(realSubject01);
        subject01.doSearch("wudi","12345");
        AbstractSubject subject02= new SubjectProxy(realSubject02);
        subject02.doSearch("kaige","66666");


    }
}